import {  EAXMINE_NOTICE_ID } from "@/common/config";
import { showToast,subscribeMessage} from "@/common/util";
import useInitAction from "@/hooks/useInitAction";
import { Popup } from "@antmjs/vantui";
import { View } from "@tarojs/components";



interface IPendingPop {
    show: boolean;
    disableText:string;
    // handlePopStatus: (status) => void;
    callBack: () => void;
}

const PendingPop: React.FC<IPendingPop> = ({ show,disableText, callBack}) => {
    const { bottomSafeHeight } = useInitAction()
    const handleClosePendingPop = () => {
        subscribeMessage([EAXMINE_NOTICE_ID]).then(()=>{
           
            callBack();
        })
       
       
    }
    return<>
    <Popup show={show} closeOnClickOverlay={false} position="bottom" safeAreaInsetBottom={false} >
            <View className="pt-38px box-border flex flex-col items-center">
                <View className="text-#888888 text-28px font-medium">新{disableText}将在审核通过后对外展示</View>
                <View className="w-full h-1px bg-#E8E8E8 mt-32px"></View>
                <View className="w-full text-center pt-46px text-#333333 font-medium" style={{ paddingBottom: bottomSafeHeight > 0 ? bottomSafeHeight + 'px' : '90rpx' }} onClick={handleClosePendingPop}>确定</View>
            </View>
        </Popup>
    </>
    
}
export default PendingPop;